﻿CREATE VIEW dbo.VIEW_INV_OUT_SERVICE_ITEM
AS
SELECT        dbo.INVOICE_OUT_SERVICE_ITEM.ID, dbo.NSI_SERVICE.SHORT_NAME AS NSI_SERVICE_NAME, dbo.INVOICE_OUT_SERVICE_ITEM.INVOICE_OUT_ID, 
                         dbo.INVOICE_OUT_SERVICE_ITEM.NSI_SERVICE_ID, dbo.INVOICE_OUT_SERVICE_ITEM.COUNT, dbo.NSI_METER.SHORT_NAME AS NSI_METER_NAME
FROM            dbo.INVOICE_OUT_SERVICE_ITEM INNER JOIN
                         dbo.NSI_SERVICE ON dbo.INVOICE_OUT_SERVICE_ITEM.NSI_SERVICE_ID = dbo.NSI_SERVICE.ID LEFT OUTER JOIN
                         dbo.NSI_METER ON dbo.NSI_SERVICE.NSI_METER_ID = dbo.NSI_METER.ID